local table_def = require "table_def"

local M = {}

---------------------普通游戏定义-----------------
local GAME_TYPE_ZHAJINHUA = 1
M.GAME_TYPE_ZHAJINHUA = GAME_TYPE_ZHAJINHUA

----------------------私人房定义------------------
local GAME_TYPE_PRIVATE_ZHAJINHUA = 100000
M.GAME_TYPE_PRIVATE_ZHAJINHUA = GAME_TYPE_PRIVATE_ZHAJINHUA

---------------------百人场定义-------------------
local GAME_TYPE_HONGHEIDAZHAN = 200000
M.GAME_TYPE_HONGHEIDAZHAN = GAME_TYPE_HONGHEIDAZHAN

local GAME_NAME = {{'hhdz_target_coins','红黑大战'},{'zjh_target_coins','炸金花'},
				   {'brnn_target_coins','百人牛牛'},{'kpqz_target_coins', '看牌抢庄'},
				   {'lfdj_target_coins','欢乐足球'}}
M.GAME_NAME = GAME_NAME

local function get_game_type(table_type)
	if table_def.in_game_type[table_type] then
		return table_type
	end
    return math.floor(table_type / 100)
end

--判断是否是百人场
-- local function is_hundred_game(table_type)
-- 	if table_type >= GAME_TYPE_HONGHEIDAZHAN then
-- 		return true
-- 	end
-- 	return false
-- end

M.get_game_type = get_game_type
-- M.is_hundred_game = is_hundred_game

-------------------------------活动定义--------------------------------
local ACTIVITY_TYPE_NEW_BIND = 1 --新手绑定活动
local ACTIVITY_TYPE_SHOW_PICTURE = 101 --只显示图片活动
local ACTIVITY_TYPE_JUMP_PICTURE = 102 --跳转面板活动
local ACTIVITY_TYPE_JUMP_WEB = 103 --跳转网页活动
local ACTIVITY_TYPE_TASK = 104 --任务型活动
local ACTIVITY_TYPE_FIRST_CAHRGE = 105 --首冲活动

local ACTIVITY_TYPE_RANK = 106 --排行榜活动
local ACTIVITY_TYPE_BIND_PHONE = 107 --绑定手机活动

local ACIVITY_SERVICE_MAP = {
    [ACTIVITY_TYPE_NEW_BIND] = {act_service_name = "new_bind_activity",rank_service_name = "card_king_rank"},
    [ACTIVITY_TYPE_RANK] = {act_service_name = "rank_activity",rank_service_name = "day_coins_rank"},
	[ACTIVITY_TYPE_TASK] = {act_service_name = "task_activity"},
	[ACTIVITY_TYPE_FIRST_CAHRGE] = {act_service_name = "charge_activity"},
}

local ACT_TASK_ONLINE_TIME = 1 --在线时长任务
local ACT_TASK_LOGIN_DAY   = 2 --登录天数任务
local ACT_TASK_PLAY_COUNT  = 3 --玩牌局数任务

local ACT_RANK_TYPE_CURR = 1 --活动今日排行榜
local ACT_RANK_TYPE_LAST = 2 --活动昨日排行榜

local NEW_BIND_ACT_SYSTEM_UID = 88888 --拉新活动系统绑定uid

M.ACTIVITY_TYPE_NEW_BIND = ACTIVITY_TYPE_NEW_BIND
M.ACTIVITY_TYPE_SHOW_PICTURE = ACTIVITY_TYPE_SHOW_PICTURE
M.ACTIVITY_TYPE_JUMP_PICTURE = ACTIVITY_TYPE_JUMP_PICTURE
M.ACTIVITY_TYPE_JUMP_WEB = ACTIVITY_TYPE_JUMP_WEB
M.ACTIVITY_TYPE_TASK = ACTIVITY_TYPE_TASK
M.ACTIVITY_TYPE_FIRST_CAHRGE = ACTIVITY_TYPE_FIRST_CAHRGE

M.ACTIVITY_TYPE_RANK = ACTIVITY_TYPE_RANK
M.ACTIVITY_TYPE_BIND_PHONE = ACTIVITY_TYPE_BIND_PHONE

M.ACIVITY_SERVICE_MAP = ACIVITY_SERVICE_MAP
M.ACT_RANK_TYPE_CURR  = ACT_RANK_TYPE_CURR
M.ACT_RANK_TYPE_LAST  = ACT_RANK_TYPE_LAST
M.NEW_BIND_ACT_SYSTEM_UID = NEW_BIND_ACT_SYSTEM_UID

M.ACT_TASK_ONLINE_TIME = ACT_TASK_ONLINE_TIME
M.ACT_TASK_LOGIN_DAY   = ACT_TASK_LOGIN_DAY
M.ACT_TASK_PLAY_COUNT  = ACT_TASK_PLAY_COUNT

---------------------------------vip定义------------------------------
local VIP_TIME_TYPE_ONE = 1 --永久
local VIP_TIME_TYPE_TWO = 2 --实时

M.VIP_TIME_TYPE_ONE = VIP_TIME_TYPE_ONE
M.VIP_TIME_TYPE_TWO = VIP_TIME_TYPE_TWO

local VIP_PRIVILEGE_TYPE_ONE   = 1  --"专属头像框"
local VIP_PRIVILEGE_TYPE_TWO   = 2  --"专属炮台"
local VIP_PRIVILEGE_TYPE_THREE = 3  --"周福利领取上限" 
local VIP_PRIVILEGE_TYPE_FOUR  = 4  --"财神驾到触发概率加成"
local VIP_PRIVILEGE_TYPE_FIVE  = 5  --"每日大抽奖免费次数"
local VIP_PRIVILEGE_TYPE_SIX   = 6  --"入场动画"
local VIP_PRIVILEGE_TYPE_SEVEN = 7  --"上线广播"
local VIP_PRIVILEGE_TYPE_EIGHT = 8  --"互动礼物"
local VIP_PRIVILEGE_TYPE_NINE  = 9  --"美女1V1"
local VIP_PRIVILEGE_TYPE_TEN   = 10 --"提现加速"

M.VIP_PRIVILEGE_TYPE_ONE   = VIP_PRIVILEGE_TYPE_ONE
M.VIP_PRIVILEGE_TYPE_TWO   = VIP_PRIVILEGE_TYPE_TWO
M.VIP_PRIVILEGE_TYPE_THREE = VIP_PRIVILEGE_TYPE_THREE
M.VIP_PRIVILEGE_TYPE_FOUR  = VIP_PRIVILEGE_TYPE_FOUR
M.VIP_PRIVILEGE_TYPE_FIVE  = VIP_PRIVILEGE_TYPE_FIVE
M.VIP_PRIVILEGE_TYPE_SIX   = VIP_PRIVILEGE_TYPE_SIX
M.VIP_PRIVILEGE_TYPE_SEVEN = VIP_PRIVILEGE_TYPE_SEVEN
M.VIP_PRIVILEGE_TYPE_EIGHT = VIP_PRIVILEGE_TYPE_EIGHT
M.VIP_PRIVILEGE_TYPE_NINE  = VIP_PRIVILEGE_TYPE_NINE
M.VIP_PRIVILEGE_TYPE_TEN   = VIP_PRIVILEGE_TYPE_TEN


-------------------------------大抽奖总中奖注数-------------------------
M.AWARD_LOTTERY_COUNT = 100
M.MESSAGE_NUM = 3

-------------------------------消息类型-------------------------------
--广播类型(0:公告,1:周福利,2:对局,3:大抽奖公告,4:vip上线)
M.MESSAGE_TYPE_SYSTEM_NOTICE = 0
M.MESSAGE_TYPE_SEVEN_AWARD = 1
M.MESSAGE_TYPE_PLAYING_ON_TABLE = 2
M.MESSAGE_TYPE_AWARD = 3
M.MESSAGE_TYPE_VIP   = 4

--首冲礼包是否领取
M.first_charge_has_taken = 1
M.first_charge_not_taken = 0

return M